Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

On set targeting #3203

Merged
merged 10 commits into from
Nov 6, 2018
Merged

On set targeting #3203

merged 10 commits into from
Nov 6, 2018

Conversation

jsfaure
Copy link
Contributor

@jsfaure jsfaure commented Oct 19, 2018

Type of change

  • Feature
  • Does this change affect user-facing APIs or examples documented on http://prebid.org?

Description of change

Add onSetTargeting method to bid adapter spec

Corresponding change for prebid.org: prebid/prebid.github.io#1008

@@ -91,6 +91,9 @@ export function newAuctionManager() {
auctionManager.setStatusForBids = function(adId, status) {
let bid = auctionManager.findBidByAdId(adId);
if (bid) bid.status = status;

const auction = find(_auctions, auction => auction.getAuctionId() === bid.auctionId);
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This setStatusForBids function could get called for other statuses someday. Calling setBidTargeting needs to be done only when status is 'BID_TARGETING_SET'

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@bretg
Copy link
Collaborator

bretg commented Oct 22, 2018

Also need to consider how to add this to the unit tests. I can't find tests for the other event (onBidWon) in the spec files either, so we ought to add one for that too. Adding @jaiminpanchal27 for advise on unit tests.

@bretg bretg requested a review from jaiminpanchal27 October 22, 2018 18:26
@jsfaure
Copy link
Contributor Author

jsfaure commented Oct 31, 2018

Also need to consider how to add this to the unit tests. I can't find tests for the other event (onBidWon) in the spec files either, so we ought to add one for that too. Adding @jaiminpanchal27 for advise on unit tests.

Added several tests for the following events: BidWon, SetTargeting, Timeout.

@jaiminpanchal27 jaiminpanchal27 added LGTM needs 2nd review Core module updates require two approvals from the core team and removed needs unit tests labels Nov 2, 2018
@jsnellbaker jsnellbaker self-assigned this Nov 2, 2018
Copy link
Collaborator

@jsnellbaker jsnellbaker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@jaiminpanchal27 jaiminpanchal27 merged commit 7fe95d8 into prebid:master Nov 6, 2018
idettman pushed a commit to rubicon-project/Prebid.js that referenced this pull request Nov 14, 2018
* Add onSetTargeting method to bid adapter spec

* Reset context before each criteo adapter test

* Add a unit test to check spec.onTimeout() is called

* Add a unit test to check spec.onBidWon() is called

* Add a unit test to check spec.onSetTargeting() is called

* Remove unused adUnits argument from callSetTargetingBidder

* Add integration test on onSetTargeting

* Move Bid status constants from targeting.js to constants.json

* Make sure onSetTargeting won't be called when the bid is not in status BID_TARGETING_SET
ghost pushed a commit to devunrulymedia/Prebid.js that referenced this pull request Jan 30, 2019
* Add onSetTargeting method to bid adapter spec

* Reset context before each criteo adapter test

* Add a unit test to check spec.onTimeout() is called

* Add a unit test to check spec.onBidWon() is called

* Add a unit test to check spec.onSetTargeting() is called

* Remove unused adUnits argument from callSetTargetingBidder

* Add integration test on onSetTargeting

* Move Bid status constants from targeting.js to constants.json

* Make sure onSetTargeting won't be called when the bid is not in status BID_TARGETING_SET
pedrolopezmrf pushed a commit to Marfeel/Prebid.js that referenced this pull request Mar 18, 2019
* Add onSetTargeting method to bid adapter spec

* Reset context before each criteo adapter test

* Add a unit test to check spec.onTimeout() is called

* Add a unit test to check spec.onBidWon() is called

* Add a unit test to check spec.onSetTargeting() is called

* Remove unused adUnits argument from callSetTargetingBidder

* Add integration test on onSetTargeting

* Move Bid status constants from targeting.js to constants.json

* Make sure onSetTargeting won't be called when the bid is not in status BID_TARGETING_SET
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
LGTM needs 2nd review Core module updates require two approvals from the core team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants